Objects Reference

plane::distance

Prototype

inline float distance(vector &v)
{ return vec_dot(normal,v)+d0; };

Parameters

Parameter Type Description
v vector& point from where distance is to be calculated

Return Value

Returns the smallest distance from the specified point to the plane.

Remarks

This method calculates the perpendicular distance from the specified point to the plane.
If distance is zero, the point is in the plane surface.
A positive distance means the point is in the front side of the plane (same side as the plane normal).
A negative distance means the point is in the back side of the plane.